package com.ruoyi.material.service.impl;

import java.util.List;

import com.ruoyi.material.domain.WarehouseInProduct;
import com.ruoyi.material.mapper.WarehouseInProductMapper;
import com.ruoyi.material.service.IWarehouseInProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 入库单商品关联Service业务层处理
 *
 * @author wng
 * @date 2024-08-04
 */
@Service
public class WarehouseInProductServiceImpl implements IWarehouseInProductService {
    @Resource
    private WarehouseInProductMapper warehouseInProductMapper;

    /**
     * 查询入库单商品关联
     *
     * @param id 入库单商品关联主键
     * @return 入库单商品关联
     */
    @Override
    public WarehouseInProduct selectWarehouseInProductById(Long id) {
        return warehouseInProductMapper.selectWarehouseInProductById(id);
    }

    /**
     * 查询入库单商品关联列表
     *
     * @param warehouseInProduct 入库单商品关联
     * @return 入库单商品关联
     */
    @Override
    public List<WarehouseInProduct> selectWarehouseInProductList(WarehouseInProduct warehouseInProduct) {
        return warehouseInProductMapper.selectWarehouseInProductList(warehouseInProduct);
    }

    /**
     * 新增入库单商品关联
     *
     * @param warehouseInProduct 入库单商品关联
     * @return 结果
     */
    @Override
    public int insertWarehouseInProduct(WarehouseInProduct warehouseInProduct) {
        return warehouseInProductMapper.insertWarehouseInProduct(warehouseInProduct);
    }

    /**
     * 修改入库单商品关联
     *
     * @param warehouseInProduct 入库单商品关联
     * @return 结果
     */
    @Override
    public int updateWarehouseInProduct(WarehouseInProduct warehouseInProduct) {
        return warehouseInProductMapper.updateWarehouseInProduct(warehouseInProduct);
    }

    /**
     * 批量删除入库单商品关联
     *
     * @param ids 需要删除的入库单商品关联主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseInProductByIds(Long[] ids) {
        return warehouseInProductMapper.deleteWarehouseInProductByIds(ids);
    }

    /**
     * 删除入库单商品关联信息
     *
     * @param id 入库单商品关联主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseInProductById(Long id) {
        return warehouseInProductMapper.deleteWarehouseInProductById(id);
    }
}
